<?php

namespace IDock\Insurance\AMIC\Request;

use IDock\Http\RequestFormat;
use IDock\Insurance\AMIC\Request\AllAMICRequest;
use IDock\Insurance\AMIC\Response\EPolicyDownloadResponse;
use IDock\Visitor\EPolicyDownloadVisitor;

class EPolicyDownloadRequest extends AllAMICRequest
{
    public $requestType = 'N0218';

    protected $response = EPolicyDownloadResponse::class;

    protected $urlTip = '下载电子保单';

    /**
     * @var  EPolicyDownloadVisitor $visitor
     */
    protected $visitor;

    public function generate(): array
    {
        $policy = $this->visitor->policyNo;
        return [
            'policyNo' => $policy,
        ];
    }
}
